<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>模板返利网－买模板返现金，免费装修，淘宝店铺装修模板免费买</title>
        <link rel="stylesheet" type="text/css" href="/Public/default/css/style.css" />
        <link rel="stylesheet" type="text/css" href="/Public/default/css/UserLogin.css" />
        <link rel="stylesheet" type="text/css" href="/Public/default/css/regStep.css" />
        <link rel="stylesheet" type="text/css" href="/Public/css/default.css" />
        <script type="text/javascript" src="__ROOT__/Public/js/jquery.min.js"></script>
        <script type="text/javascript" src="__ROOT__/Public/js/jquery.form.js"></script>
        <script type="text/javascript" src="__ROOT__/Public/js/operamasks-ui.min.js"></script>
        <script src="http://a.tbcdn.cn/s/kissy/1.1.6/seed-min.js"></script>
        <script src="http://a.tbcdn.cn/apps/pamirsshop/wiki/scripts/wiki.js"></script>
    </head>

    <body onload="bhtml()">
        <div id="edit"></div>
        <div id="meng"></div>
        <div id="tips"></div>
        <!--头部-->
        <div class="top">
            <ul>
                <li><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=496886097&site=qq&menu=yes">售前QQ:496886097</a>；<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=2261356156&site=qq&menu=yes">售后QQ:2261356156</a>
                 <a href="#">网站地图</a> 
                 <a href="javascript:" onClick="window.external.addFavorite('http://www.fanlibm.com','模板反复网')" title="模板反复网">收藏本站</a> 
                 <?php if(empty($_SESSION['userid'])): ?><a href="__APP__/Public/register" class="red">免费注册</a> ¦ 
                 <a href="__APP__/Public/login" class="blue">登录</a> ¦ 
                 <?php else: ?>
                 <a href="__APP__/Public/logout" class="blue">安全退出</a> ¦<?php endif; ?>
                 <a href="__APP__/Index">网站首页</a> ¦ 
                 <a href="#">客服中心</a> ¦ 
                 <a href="#">帮助中心</a></li>
            </ul> 
        </div>
        <!--LOGO-->
        <div class="head">
            <div class="logo"><img src="/Public/default/images/logo.jpg" width="227" height="90" title="返利网" /></div>
            <div class="banner"><img src="/Public/default/images/banner.jpg" width="637" height="109" title="广告" /></div>
        </div>
        <!--导航-->
        <div class="nav">
            <div class="w980">
                <a href="/" <?php if(($module_name == 'Index') and ($action_name == 'index') or ($module_name == 'Public')): ?>class="cur"<?php endif; ?> >首页</a> 
                <a href="__APP__/Temp/index" <?php if(($module_name == 'Temp') and ($action_name == 'index')): ?>class="cur"<?php endif; ?> >装修模板</a> 
                <a href="__APP__/Article/index" <?php if(($module_name == 'Article') and ($action_name == 'index')): ?>class="cur"<?php endif; ?> >开店知识</a> 
                <a href="/" >返利教程（必读）</a> 
                <a href="/" >商业合作</a>               
            </div>
        </div>        
<script type="text/javascript">
            function qbot(){
                $("#tips").hide();
                $("body").css({"overflow":"auto"});
            }
            function query(i){
                var f = $('#formwork option:selected').val();
                var t = $('#trade option:selected').val();
                var c = $('#color option:selected').val();
                var s = $('#sty option:selected').val();
				var r = $('#rate option:selected').val();
                var n = $('#num').val();
                $.get('__URL__/addsty/f/'+f+'/t/'+t+'/c/'+c+'/s/'+s+'/id/'+i+'/n/'+n+'/r/'+r,function(data){
                    if(data == 1){
                        $("#tips").hide();
                        $("body").css({"overflow":"auto"});
                        var h = window.screen.height;
                        var w = window.screen.width;
                        $("#tips").css({"left":(w/2-100)+"px","top":(h/2-100)+"px","display":"block"});
                        $("#tips").html('<div style="font-size:12px; padding:10px;">修改成功</div>').animate({opacity: 'hide'}, 2000);
						document.location.reload();		
                    }
                    if(data == 0){
                        alert("上架后的模板，不允许设置属性为空");
                    }
                });
            }
            function bhtml(){
                var id = '<?php echo ($temp["id"]); ?>';
                $.get("__URL__/qhtml/id/"+id,function(data){
                    $("#ht").html(data);
                });
            }
        </script>

<div id="bd">
    <div class="left1">
        <script type="text/javascript">
	$(document).ready(function(e) {
        $(".userMenu li").mouseover(function(){
			$(this).css("background-color","#FFFAE2");
			});
		 $(".userMenu li").mouseleave(function(){
			$(this).css("background-color","#fff");
			});	
    });
</script>
<div class="usercenter">
    <div class="hd"></div>
    <div class="bd">
        <ul class="userMenu">
            <li><a href="__URL__/index">用户概况</a></li>
            <li><a href="__URL__/update">修改资料</a></li>
            <li><a href="__URL__/changepwd">修改密码</a></li>
            <?php if($_SESSION['type']== 1): ?><li><a href="__URL__/temps">我的模板</a></li><?php endif; ?>
            <li><a href="__URL__/orderlist">我的订单</a></li>
            <li><a href="__URL__/chongzhi">现金充值</a></li>
            <li><a href="__URL__/tixian">提现申请</a></li>
            <li><a href="__URL__/zdmx">账单明细</a></li>
        </ul>
    </div>
</div>

    </div>
    <div class="right1">
        <div class="userinfos">
            <div class="topinfo">
                <div class="innerbox">
                    <div class="photo"><img src="/Public/images/photo<?php echo (session('type')); ?>.jpg" width="48" height="48"><span><?php if($_SESSION['type']== 1): ?>设计师 <?php else: ?>掌&nbsp;&nbsp;柜<?php endif; ?></span></div>
                    <div class="info">
                        <p style="font-size:14px; font-weight:bold;"><span class="name"><?php echo (session('name')); ?></span>，欢迎您来到模板返利网</p>
                        <p>已经绑定手机号码：<?php echo (substr(session('phone'),0,3)); ?>*****<?php echo (substr(session('phone'),8,3)); ?>&nbsp;&nbsp;<a href="__URL__/changephone">更换绑定手机</a></p>
                        <p style="color:#666; border-bottom:1px solid #ddd;  height:35px; display:block; width:380px;">
                        <?php if(empty($_SESSION['qq'])): ?>您还没有填写QQ，为了方便联系，现在去补充吧，<a href="__URL__/update">补全资料</a><?php else: ?>常用QQ：<?php echo (session('qq')); ?>&nbsp;&nbsp;<?php endif; ?>                        </p>
                        <p style="margin-top:5px;">账户余额：<b style="color:#d50000; padding:0 5px; font-size:18px;"><?php echo ($money); ?></b>元</p>
                        <p style="height:35px; margin-top:7px;" class="bottom">
                        <?php if($_SESSION['type']== 1): ?><a href="__URL__/chongzhi" id="chong"><span>充&nbsp;&nbsp;值</span></a><?php endif; ?>
                        <a href="__URL__/tixian" id="tixian"><span>提&nbsp;&nbsp;现</span></a>
                        <a href="__URL__/orderlist/status/1">未付款订单</a>
                        <a href="__URL__/orderlist"><?php if($_SESSION['type']== 1): ?>订单记录<?php else: ?>购买的模板<?php endif; ?></a>
                        </p> 
                    </div>
                </div>
            </div>
            <div class="topnote">
                <div class="innerbox">
                    <dl>
                        <dt>公告</dt>
                        <?php if(is_array($nlist)): foreach($nlist as $k=>$li): ?><dd><a href="#"><?php echo ($k+1); ?>.<?php echo ($li["title"]); ?></a></dd><?php endforeach; endif; ?>
                    </dl>
                </div>
            </div>
            <div class="ad1">
                <?php if($_SESSION['type']== 1): ?><embed height="150" width="750" flashvars="bannerWidth=750&bannerHeight=150&bannerSID=http://img3.tbcdn.cn/tfscom/T1G9RQXpheXXXgzXjX.xml&bannerXML=&bannerLink=http://&dataSource=&bid=35388315&appSource=default" wmode="transparent" allowscriptaccess="always" quality="high" name="35388315" id="35388315" style="" src="http://img.uu1001.cn/bcv3.swf?v=20121219" type="application/x-shockwave-flash"/></embed>         
                    <?php else: ?>
                    <embed height="120" width="750" flashvars="bannerWidth=750&bannerHeight=120&bannerSID=http://img2.tbcdn.cn/tfscom/T1aOXQXvReXXXgzXjX.xml&bannerXML=&bannerLink=http://&dataSource=&bid=35384473&appSource=default" wmode="transparent" allowscriptaccess="always" quality="high" name="35384473" id="35384473" style="" src="http://img.uu1001.cn/bcv3.swf?v=20121219" type="application/x-shockwave-flash"/></embed><?php endif; ?>
            </div>

            <div class="list J_TWidget" data-widget-type="Tabs" data-widget-config="{'triggerType':'click'}">
                <ul class="ks-switchable-nav">
                    <?php if($_SESSION['type'] == 1): ?><li class="ks-active">我的模板</li><?php endif; ?>                    
                    <li <?php if($_SESSION['type'] != 1): ?>class="ks-active"<?php endif; ?>>进行中的订单</li>
                    <li>已完成的订单</li>                    
                </ul>
                <div class="contents" style="width:99999px;">
                    <div class="ks-switchable-content">
                    	<?php if($_SESSION['type'] == 1): ?><div class="templist"><div class="ops"><a href="javascript:void(0);" id="gettemps">一键获取所有模板</a><a href="addtemp">手动添加模板</a></div>
<div class="templist">
    <?php if(!empty($templist)): ?><form action="__URL__/temp_admin" method="post" id="tempsForm">
            <div class="topadmin">
                <span>选择操作：</span><select name="action" id="action">        	
                    <option value="del">删除</option>
                    <option value="up">上架</option>
                    <option value="down">下架</option>
                    <option value="rate">设置比例</option>
                </select>
                <span id="setrate"><span>比例：</span><select name="rate">
                        <option value="1">100%</option>
                        <option value="0.7">70%</option>
                        <option value="0.5">50%</option>
                    </select></span>
                <input type="submit" id="submit" value="提交" />
            </div>
            <div class="list-title">
                <span class="id"><input type="checkbox" onclick="reverse(this)"  id="checkall" value=""  /></span>
                <span class="title">标题</span>
                <span class="frontpage">缩略图</span>
                <span class="price">价格</span>
                <span class="count">市场销量</span>
                <span class="count1">本站销量</span>
                <span class="rate">返现比例</span>
                <span class="status">状态</span>
                <span class="op">管理</span>
            </div>
            <?php if(is_array($templist)): $i = 0; $__LIST__ = $templist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><div class="temp-item">
                    <?php if($up == 1): if($v['status'] == 0): ?><div class="po" id="<?php echo ($v["id"]); ?>">模板上架失败，请编辑完善模板信息</div><?php endif; endif; ?>
                    <div class="po" style="display: none;" id="<?php echo ($v["id"]); ?>">模板上架失败，请编辑完善模板信息</div>
                    <span class="id"><input type="checkbox" name="id[]" value="<?php echo ($v["id"]); ?>"  /></span>
                    <span class="title"><a target="_blank" title="访问模板" href="http://<?php if($v["type"] == 1): ?>zxn<?php else: ?>zx<?php endif; ?>.taobao.com/detail.htm?id=<?php echo ($v["id"]); ?>"><?php echo ($v["title"]); ?></a></span>
                    <span class="frontpage"><img src="<?php echo ($v["frontpage"]); ?>" style="width:80px;height:125px;" /></span>
                    <span class="price"><?php echo ($v["price"]); ?></span>
                    <span class="count"><?php echo ($v["count"]); ?></span>
                    <span class="count1"><?php echo ($v["count1"]); ?></span>
                    <span class="rate"><?php echo ($v['rate']*100); ?>%</span>
                    <span class="status"><?php if($v["status"] == 0): ?>下架<?php else: ?><em  style="color: red;">上架</em><?php endif; ?></span>
                    <span class="op">
                        <?php if($v["status"] == 0): ?><a href="javascript:;" onclick="grounding('<?php echo ($v["id"]); ?>',0)" title="设置为上架">上架</a>
                            <?php else: ?>
        	<a href="javascript:;" onclick="grounding('<?php echo ($v["id"]); ?>',1)" title="设置为下架">下架</a><?php endif; ?>       
                        <a href="javascript:;" onclick="edit('<?php echo ($v["id"]); ?>')">编辑</a>
                        <a href="__URL__/deltemp/id/<?php echo ($v["id"]); ?>" onclick="return a=confirm('确认删除？')" title="点击删除">删除</a>
                    </span>
                </div><?php endforeach; endif; else: echo "" ;endif; ?>
            <div class="pages" style="margin:10px 0;"><?php echo ($page); ?></div>
        </form>
        <?php else: ?>
        <div class="no-jilu">
            暂无模板记录
        </div><?php endif; ?>
</div>

<script type="text/javascript">
    $(document).ready(function(e) {	
		$('#tips').omDraggable({handle:"h3"});	
        var h = window.screen.height;
        var w = window.screen.width;	
        $("#meng").css({"width":w+"px","height":h+"px"});
        $("#tips").css({"left":(w/2-100)+"px","top":(h/2-100)+"px"});
        $(".temp-item").mouseover(function(){
            $(this).css("background-color",'#eee');
        });	
        $(".temp-item").mouseleave(function(){
            $(this).css("background-color",'#fff');
        });	
        $("#gettemps").click(function(){
            if(confirm("一键获取会将您在淘宝装修市场的所有模板都获取到本站数据库中，但是否展示，由您自由操作。")){
                var name=prompt("请输入您的设计师账号","");
                if(name==""){
                    alert("设计师账号不得为空");
                    return false;		
                }
                else if(!name) return false;	
                $("#meng").fadeIn();
                $("#tips").html("<img src='/Public/images/wait.gif' width='100' /><br/>正在加载，请稍候").show();			
                $.post("__URL__/gettemps",{'designer':name},function(data){						
                    document.location.reload();
                },'json')
            }
        });	
        $("#tempsForm").submit(function(){			
            if($(":checkbox:checked").length==0){
                alert("请先选择模板");
                return false;
            }
        });	
        $("#action").change(function(){
            if($(this).val()=="rate") $("#setrate").show();
            else $("#setrate").hide();
        });
			
    });	
    function reverse(dom){  //全选与反选 
        $(".templist :checkbox").each(function () {  
            $(this).attr("checked", !$(this).attr("checked"));  
        });
        $(dom).attr("checked", !$(dom).attr("checked"));
    }	
    //编辑
    function edit(id){
        $.get('__URL__/selectid/id/'+id,function(data){
            $("#tips").html(data);
        });
        var h = window.screen.height;
        var w = window.screen.width;
        $("body").css({"overflow-Y":"hidden"});
        $("#tips").css({"left":(w/2-100)+"px","top":(h/2-100)+"px","display":"block"});
    }
    //上架
    function grounding(i,s){
        $.get('__URL__/changestatus/id/'+i+'/s/'+s,function(data){
            if(data == 1){
                location.reload() ;
            }else{
                $("#"+i).show();
            }
//             $("#idjs").html(data);
        });
    }

    
</script></div><?php endif; ?> 
                        <div  class="templist" <?php if($_SESSION['type'] == 1): ?>style="display:none;"<?php endif; ?>>
            <?php if(!empty($list1)): ?><form action="" method="post" id="tempsForm">
                    <div class="list-title">
                        <span class="title">模板名</span>
                        <span class="frontpage">缩略图</span>
                        <span class="price">价格</span>
                        <?php if($_SESSION['type'] == 1): ?><span class="count">用户名</span><?php endif; ?>
                        <?php if($_SESSION['type'] == 2): ?><span class="count" style="width:100px;">设计师</span>
                            <?php else: ?><span class="count" style="width:100px;">掌柜</span><?php endif; ?>
                        <span class="rate">返现比例</span>
                        <span class="status" <?php if($_SESSION['type'] == 2): ?>style="width:120px;"<?php endif; ?>>状态</span>
                        <span class="op" style="width:100px;">管理</span>
                    </div>
                    <?php if(is_array($list1)): foreach($list1 as $k=>$v): ?><div class="temp-item" style="position: relative;" <?php if($_SESSION['type'] == 1): ?>id="q<?php echo ($v["id"]); ?>"<?php else: ?>id="w<?php echo ($v["id"]); ?>"<?php endif; ?>>
                            <span class="title"><a target="_blank" title="访问模板" href="http://<?php if($temps1[$k][0][type] == 1): ?>zxn<?php else: ?>zx<?php endif; ?>.taobao.com/detail.htm?id=<?php echo ($temps1["$k"]["0"]["id"]); ?>"><?php echo ($v["title"]); ?></a></span>
                            <span class="frontpage"><img src="<?php echo ($temps1["$k"]["0"]["frontpage"]); ?>" width="80" /></span>
                            <span class="price"><?php echo ($temps1["$k"]["0"]["price"]); ?></span>
                            <?php if($_SESSION['type'] == 1): ?><span class="count" id="zgname"><?php echo ($v["name"]); ?></span><?php endif; ?>
                            <span class="count" style="width:100px;">
                                <?php if($_SESSION['type'] == 2): ?><h4><?php echo ($temps1["$k"]["0"]["ww"]); ?></h4>
                                    <a href="http://amos.im.alisoft.com/msg.aw?spm=0.0.0.0.UZIR91&amp;v=2&amp;uid=<?php echo ($temps1["$k"]["0"]["ww"]); ?>&amp;s=1&amp;site=cntaobao&amp;charset=utf-8" target="_blank" data-spm-anchor-id="0.0.0.0">
                                        <img border="0" alt="" src="http://amos.im.alisoft.com/online.aw?v=2&amp;uid=<?php echo ($temps1["$k"]["0"]["ww"]); ?>&amp;site=cntaobao&amp;s=1&amp;charset=utf-8">
                                    </a><?php endif; ?>
                                <?php if($_SESSION['type'] == 1): if($v['wwname'] == null): ?>等待用户的添加旺旺<?php else: ?>
                                        <h4><?php echo ($v["wwname"]); ?></h4>
                                        <a href="http://amos.im.alisoft.com/msg.aw?spm=0.0.0.0.UZIR91&amp;v=2&amp;uid=<?php echo ($v["wwname"]); ?>&amp;s=1&amp;site=cntaobao&amp;charset=utf-8" target="_blank" data-spm-anchor-id="0.0.0.0">
                                            <img border="0" alt="" src="http://amos.im.alisoft.com/online.aw?v=2&amp;uid=<?php echo ($v["wwname"]); ?>&amp;site=cntaobao&amp;s=1&amp;charset=utf-8">
                                        </a><?php endif; endif; ?>
                            </span>
                            <span class="rate" ><em id="rate"><?php echo ($temps1[$k][0]['rate']*100); ?></em>%</span>
                            <?php if($_SESSION['type'] == 2): ?><span class="status" id="qu<?php echo ($v["indent"]); ?>" <?php if($_SESSION['type'] == 2): ?>style="width:120px;color:red;"<?php else: ?>style="color:red;"<?php endif; ?>">
                                    <?php if($v["status"] == 1): ?>未确认<?php elseif($v["status"] == 2): ?>等待设计师确认<?php else: ?>完成<?php endif; ?>
                                </span>
                                <?php else: ?>
                                <span class="status"  id="query<?php echo ($v["indent"]); ?>" <?php if($_SESSION['type'] == 2): ?>width:120px;color:red;<?php else: ?>style="color:red;"<?php endif; ?>><?php if($v["status"] == 1): ?>购买未确认<?php elseif($v["status"] == 2): ?>设计师未确认<?php else: ?>完成<?php endif; ?></span><?php endif; ?>
                            <?php if($_SESSION['type'] == 2): ?><span class="op" style="width:100px;">  
                                    <span id="q<?php echo ($v["indent"]); ?>"  >
                                        <?php if($v['status'] == 1): ?><a href="javascript:;" onclick="ws('<?php echo ($v["indent"]); ?>')">确认</a><?php else: ?>确认<?php endif; ?>
                                    </span>
                                    <?php if($v['status'] != 3): ?><a href="javascript:;" onclick="dell('<?php echo ($v["id"]); ?>',0)" title="点击删除">删除</a><?php endif; ?>
                                </span>
                                <?php else: ?>
                                <span class="op" style="width:100px;">
                                    <span id="query1<?php echo ($v["indent"]); ?>">
                                        <?php if($v["status"] == 2): ?><a href="javascript:;" onclick="qu('<?php echo ($v["indent"]); ?>','<?php echo ($v["wwname"]); ?>','<?php echo ($temps1["$k"]["0"]["id"]); ?>',this)">确认</a><?php else: ?>确认<?php endif; ?>
                                    </span>
                                    <?php if($v['status'] != 3): ?><a href="javascript:;" onclick="dell('<?php echo ($v["id"]); ?>',1)" title="点击删除">删除</a><?php endif; ?>
                                </span><?php endif; ?>
                        </div><?php endforeach; endif; ?>
                    <div class="pages" style="margin:10px 0;"><?php echo ($page1); ?></div>
                </form>
                <?php else: ?>
                <div class="no-jilu">
                    暂无模板记录    
                </div><?php endif; ?>
</div>
                        <div  class="templist" style="display:none;">
            <?php if(!empty($list2)): ?><form action="" method="post" id="tempsForm">
                    <div class="list-title">
                        <span class="title">模板名</span>
                        <span class="frontpage">缩略图</span>
                        <span class="price">价格</span>
                        <?php if($_SESSION['type'] == 1): ?><span class="count">用户名</span><?php endif; ?>
                        <?php if($_SESSION['type'] == 2): ?><span class="count" style="width:100px;">设计师</span>
                            <?php else: ?><span class="count" style="width:100px;">掌柜</span><?php endif; ?>
                        <span class="rate">返现比例</span>
                        <span class="status" <?php if($_SESSION['type'] == 2): ?>style="width:120px;"<?php endif; ?>>状态</span>
                        <span class="op" style="width:100px;">管理</span>
                    </div>
                    <?php if(is_array($list2)): foreach($list2 as $k=>$v): ?><div class="temp-item" style="position: relative;" <?php if($_SESSION['type'] == 1): ?>id="q<?php echo ($v["id"]); ?>"<?php else: ?>id="w<?php echo ($v["id"]); ?>"<?php endif; ?>>
                            <span class="title"><a target="_blank" title="访问模板" href="http://<?php if($temps2[$k][0][type] == 1): ?>zxn<?php else: ?>zx<?php endif; ?>.taobao.com/detail.htm?id=<?php echo ($temps2["$k"]["0"]["id"]); ?>"><?php echo ($v["title"]); ?></a></span>
                            <span class="frontpage"><img src="<?php echo ($temps2["$k"]["0"]["frontpage"]); ?>" width="80" /></span>
                            <span class="price"><?php echo ($temps2["$k"]["0"]["price"]); ?></span>
                            <?php if($_SESSION['type'] == 1): ?><span class="count" id="zgname"><?php echo ($v["name"]); ?></span><?php endif; ?>
                            <span class="count" style="width:100px;">
                                <?php if($_SESSION['type'] == 2): ?><h4><?php echo ($temps2["$k"]["0"]["ww"]); ?></h4>
                                    <a href="http://amos.im.alisoft.com/msg.aw?spm=0.0.0.0.UZIR91&amp;v=2&amp;uid=<?php echo ($temps2["$k"]["0"]["ww"]); ?>&amp;s=1&amp;site=cntaobao&amp;charset=utf-8" target="_blank" data-spm-anchor-id="0.0.0.0">
                                        <img border="0" alt="" src="http://amos.im.alisoft.com/online.aw?v=2&amp;uid=<?php echo ($temps2["$k"]["0"]["ww"]); ?>&amp;site=cntaobao&amp;s=1&amp;charset=utf-8">
                                    </a><?php endif; ?>
                                <?php if($_SESSION['type'] == 1): if($v['wwname'] == null): ?>等待用户的添加旺旺<?php else: ?>
                                        <h4><?php echo ($v["wwname"]); ?></h4>
                                        <a href="http://amos.im.alisoft.com/msg.aw?spm=0.0.0.0.UZIR91&amp;v=2&amp;uid=<?php echo ($v["wwname"]); ?>&amp;s=1&amp;site=cntaobao&amp;charset=utf-8" target="_blank" data-spm-anchor-id="0.0.0.0">
                                            <img border="0" alt="" src="http://amos.im.alisoft.com/online.aw?v=2&amp;uid=<?php echo ($v["wwname"]); ?>&amp;site=cntaobao&amp;s=1&amp;charset=utf-8">
                                        </a><?php endif; endif; ?>
                            </span>
                            <span class="rate" ><em id="rate"><?php echo ($temps2[$k][0]['rate']*100); ?></em>%</span>
                            <?php if($_SESSION['type'] == 2): ?><span class="status" id="qu<?php echo ($v["indent"]); ?>" <?php if($_SESSION['type'] == 2): ?>style="width:120px;color:red;"<?php else: ?>style="color:red;"<?php endif; ?>">
                                    <?php if($v["status"] == 1): ?>未确认<?php elseif($v["status"] == 2): ?>等待设计师确认<?php else: ?>完成<?php endif; ?>
                                </span>
                                <?php else: ?>
                                <span class="status"  id="query<?php echo ($v["indent"]); ?>" <?php if($_SESSION['type'] == 2): ?>width:120px;color:red;<?php else: ?>style="color:red;"<?php endif; ?>><?php if($v["status"] == 1): ?>购买未确认<?php elseif($v["status"] == 2): ?>设计师未确认<?php else: ?>完成<?php endif; ?></span><?php endif; ?>
                            <?php if($_SESSION['type'] == 2): ?><span class="op" style="width:100px;">  
                                    <span id="q<?php echo ($v["indent"]); ?>"  >
                                        <?php if($v['status'] == 1): ?><a href="javascript:;" onclick="ws('<?php echo ($v["indent"]); ?>')">确认</a><?php else: ?>确认<?php endif; ?>
                                    </span>
                                    <?php if($v['status'] != 3): ?><a href="javascript:;" onclick="dell('<?php echo ($v["id"]); ?>',0)" title="点击删除">删除</a><?php endif; ?>
                                </span>
                                <?php else: ?>
                                <span class="op" style="width:100px;">
                                    <span id="query1<?php echo ($v["indent"]); ?>">
                                        <?php if($v["status"] == 2): ?><a href="javascript:;" onclick="qu('<?php echo ($v["indent"]); ?>','<?php echo ($v["wwname"]); ?>','<?php echo ($temps2["$k"]["0"]["id"]); ?>',this)">确认</a><?php else: ?>确认<?php endif; ?>
                                    </span>
                                    <?php if($v['status'] != 3): ?><a href="javascript:;" onclick="dell('<?php echo ($v["id"]); ?>',1)" title="点击删除">删除</a><?php endif; ?>
                                </span><?php endif; ?>
                        </div><?php endforeach; endif; ?>
                    <div class="pages" style="margin:10px 0;"><?php echo ($page2); ?></div>
                </form>
                <?php else: ?>
                <div class="no-jilu">
                    暂无模板记录    
                </div><?php endif; ?>
</div>                                              
                    </div>
                </div>               
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    //购买添加旺旺信息
    function ws(ind){
        $.get('__URL__/allmes/ind/'+ind,function(data){
            $("#tips").show();
            $("body").css({"overflow-Y":"hidden"});
            var h = window.screen.height;
            var w = window.screen.width;
            $("#tips").css({"left":(w/2-100)+"px","top":(h/2-100)+"px","display":"block"});
            $("#tips").html(data);
        });
       
 
    }
    //确认
    function wsy(i,ind){
        var wwname = $("#wwname").val();
        if(i ==1){
            $.get('__URL__/allmesy/ind/'+ind+'/wwname/'+wwname,function(){
                $("#qu"+ind).html("等待设计师确认");
                $("#q"+ind).html("确认");
                $("#tips").hide();
                $("body").css({"overflow":"auto"});
                var h = window.screen.height;
                var w = window.screen.width;
                $("#edit").css({"left":(w/2)+"px","top":(h/2-100)+"px","display":"block"});
                $("#edit").html('修改成功').animate({opacity: 'hide'}, 1000);
            });
        }else{
            $("#tips").hide();
            $("body").css({"overflow":"auto"});
        }
    }
    //设计师确认
    function qu(ind,wwname,id,dom){
        var zgname = $(dom).parent().parent().siblings("#zgname").html(); //掌柜名
        var price = $(dom).parent().parent().siblings(".price").html() * $(dom).parent().parent().siblings(".rate").children("#rate").html() *0.01; //返利费用
        var r=confirm("该用户提交的旺旺名为："+wwname+" ,返现金额为"+price+"请核对无误后确认。现在是否确认完成订单？(订单完成后将返现到该用户)")
        if (r==true){
            $.get('__URL__/que/ind/'+ind+'/price/'+price+'/zgname/'+zgname+'/id/'+id,function(data){
                if(data){
                    var h = window.screen.height;
                    var w = window.screen.width;
                    $("#edit").css({"left":(w/2)+"px","top":(h/2-100)+"px","display":"block"});
                    $("#edit").html(data);
                    var t=setTimeout("settime()",1000)
                }else{
                    $("#query"+ind).html("完成");
                    $("#query1"+ind).html("确认");
                    var h = window.screen.height;
                    var w = window.screen.width;
                    $("#edit").css({"left":(w/2)+"px","top":(h/2-100)+"px","display":"block"});
                    $("#edit").html('确认成功').animate({opacity: 'hide'}, 1000);
					document.location.reload();
                }
            });
        }
    }
    function settime(){
        $("#edit").animate({opacity: 'hide'}, 5000);
    }
    function sel(dom){
        var v = $(dom +'option:selected') .val();
        if(v == "qu"){
            $("#wangwang").show();
        }
    }
    //参数传递
    function pag(i){
        $.get('__URL__/orderlist/i/'+i,function(){
                
        });
    }
    function dell(i,n){
        var r=confirm("确认删除?")
        if (r==true){
            if(n==1){
                $("#q"+i).animate({opacity: 'hide'}, 500);
            }else{
                $("#w"+i).animate({opacity: 'hide'}, 500);
            }
            $.get('__URL__/dellorder/id/'+i,function(data){
                if(data == 1){
                    var h = window.screen.height;
                    var w = window.screen.width;
                    $("#edit").css({"left":(w/2)+"px","top":(h/2-100)+"px","display":"block"});
                    $("#edit").html('删除成功').animate({opacity: 'hide'}, 1000);
                }
                    
            });
        }
    }
</script>
</html>